$primary-color: #0078D4; // Windows 10 主题蓝色
$secondary-color: #444; // 辅助颜色
:root {
    --el-component-size: 40px;
    /* 更新为 40px，以增加高度 */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

.el-textarea__inner,
.el-input__inner {
    font-size: 14px;
}

// windows10.scss
// 按钮样式
.el-button {
    background-color: $primary-color;
    border-color: $primary-color;
    color: #fff;
    border-radius: 2px;
    box-shadow: none;
    outline: none;
    height:38px;

    &:hover {
        background-color: darken($primary-color, 10%);
    }

    &.el-button--primary {
        background-color: transparent;
        border-color: $primary-color;
        color: $primary-color;
        width: 150px;
        height: 38px;

        &:hover {
            background-color: $primary-color;
            color: #fff;
        }
    }
    &.is-circle{
        width:38px;
        height:38px;
    }
    &.el-button--text {
        color: $primary-color;

        &:hover {
            color: darken($primary-color, 10%);
        }
    }
}
// 输入框和文本域
.el-input,
.el-textarea {
    border-width: 0px; // 维持原宽度，但在下面设置具体颜色时会调整
    border-style: solid;
    border-radius: 4px; // 增大圆角以显得更现代
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; // 简化过渡效果，仅针对需要改变的属性

    &.is-focused,
    &:focus {
        border-color: $primary-color;
        box-shadow: 0 0 0 1px $primary-color; // 添加聚焦时的微妙阴影
    }
    &textarea {
        min-height: 40px;
        line-height: 40px;
    }
    &.is-disabled {
        background-color: #f5f5f5;
        border-color: #ddd; // 使用更淡的灰色
        color: #999;
    }

    &.el-input__inner,
    &.el-textarea__inner {
        padding: 8px 12px; // 增加内边距以提升用户输入体验
        border-color: lighten($secondary-color, 15%);
    }

    &.el-input__prefix,
    &.el-input__suffix {
        color: #999;
        margin-right: 4px; // 或 margin-left 为prefix添加间距
    }

    // 可选：为非聚焦状态的输入框设置更浅的边框颜色
    &:not(.is-focused):not(:focus) {
        border-color: lighten($secondary-color, 5%);
    }
}

// 表格
.el-table {
    border: 1px solid $secondary-color;
    border-collapse: separate;
    border-radius: 2px;

    th {
        background-color: #f5f5f5;
        color: #444;
        font-weight: bold;
    }

    tr {
        height: 36px;
    }

    tr:hover {
        background-color: #f2f2f2;
    }

    td {
        border-bottom: 1px solid $secondary-color;
        padding: 8px 12px;
    }

    &.el-table--border th,
    &.el-table--border td {
        border-right: 1px solid $secondary-color;
    }

    &.el-table__empty-block {
        text-align: center;
        color: #999;
    }
}

// 菜单和下拉菜单
.el-menu,
.el-submenu {
    background-color: #fff;
    border: 1px solid $secondary-color;
    border-radius: 2px;

    &.el-menu--horizontal {
        border-bottom: none;
    }

    &.el-menu-item {
        color: #444;
        height: 36px;
        padding: 0 20px;
        line-height: 36px;
        transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);

        &:hover {
            background-color: #eaeaea;
            color: $primary-color;
        }

        &.is-active {
            background-color: $primary-color;
            color: #fff;
        }
    }

    &.el-submenu__title {
        padding-left: 36px;
    }
}

// 提示信息
.el-message {
    background-color: #f5f5f5;
    border: 1px solid $secondary-color;
    border-radius: 2px;
    padding: 15px 15px 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);

    &.el-message.is-success {
        border-color: #4dbd74;
    }

    &.el-message.is-info {
        border-color: #909399;
    }

    &.el-message.is-warning {
        border-color: #f59c1a;
    }

    &.el-message.is-error {
        border-color: #f56c6c;
    }
}

// 分页
.el-pagination {
    &.el-pager {
        margin: 0;

        &>button {
            height: 36px;
            min-width: 36px;
            border: none;
            border-radius: 2px;
            padding: 0 6px;
            color: #444;
            background-color: #fff;
            transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);

            &:hover {
                background-color: #eaeaea;
                color: $primary-color;
            }

            &.current {
                background-color: $primary-color;
                color: #fff;
            }
        }
    }
}

// 进度条
.el-progress {
    &.el-progress-bar__inner {
        background-color: $primary-color;
    }
}
// 对话框(Dialog)
.el-dialog {
    border-radius: 2px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);

    .el-dialog__header {
        padding: 20px 20px 10px;
        border-bottom: 1px solid $secondary-color;

        .el-dialog__title {
            font-size: 18px;
            font-weight: bold;
        }
    }

    .el-dialog__body {
        padding: 20px;
    }

    .el-dialog__footer {
        border-top: 1px solid $secondary-color;
        padding: 10px 20px;
        text-align: right;

        .el-button+.el-button {
            margin-left: 10px;
        }
    }
}

// 卡片(Card)
.el-card {
    border-width: 0.5px; // 减小边框宽度
    border-color: lighten($secondary-color, 20%); // 使用较浅的颜色
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 4px rgba(0, 0, 0, 0.04); // 减小阴影强度

    &.is-bordered {
        border-width: 1px;
        border-color: $secondary-color;
    }

    .el-card__header {
        padding: 20px 24px; // 增加内边距
        border-bottom: 0.5px solid lighten($secondary-color, 20%); // 减小边框宽度和颜色
        margin-bottom: 10px; // 添加间距
    }

    .el-card__body {
        padding: 24px; // 增加内边距
    }
}

// 标签页(Tabs)
.el-tabs {
    margin-top:12px;
    &.el-tabs__item {
        padding: 0 12px;
        height: 40px;
        line-height: 40px;
        border-radius: 2px 2px 0 0;

        &.is-active {
            color: #fff;
            background-color: $primary-color;
        }
    }

}

// 选择器(Select)
// 选择器(Select)
.el-select {
    .el-select__wrapper{
        height: 40px; // 直接设置高度
        line-height: 40px;
    }
    .el-input {
        
        .el-input__inner {
            padding-right: 30px; // 保持箭头图标空间
            border-radius: 4px; // 与输入框统一圆角
            border: 1px solid lighten($secondary-color, 15%);
            background-color: #fff;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
            
            // 与输入框聚焦样式保持一致
            &.is-focused,
            &:focus {
                border-color: $primary-color;
                box-shadow: 0 0 0 1px $primary-color;
            }
        }
    }

    .el-select__caret {
        line-height: 36px;
    }

    .el-select-dropdown {
        .el-scrollbar__view {
            .el-select-dropdown__item {
                padding: 8px 12px;
                cursor: pointer;
                transition: all 0.3s;
                user-select: none;

                &:hover {
                    background-color: #f5f5f5;
                }

                &.selected {
                    color: #fff;
                    background-color: $primary-color;
                }
            }
        }

        // 下拉菜单容器样式调整，与输入框风格协调
        &,
        .el-select-dropdown__list {
            border-radius: 4px;
            border: 1px solid lighten($secondary-color, 15%);
            background-color: #fff;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
        }
    }
}


// 树形组件(Tree)
.el-tree {
    .el-tree-node__content {
        height: 36px;
        line-height: 36px;
        display: flex;
        align-items: center;
        border-radius: 2px;

        .el-checkbox {
            margin-right: 8px;
        }

        .el-tree-node__expand-icon {
            width: 36px;
            height: 36px;
            line-height: 36px;
            text-align: center;
            cursor: pointer;
        }
    }

    .el-tree-node.is-expanded .el-tree-node__children {
        display: block;
    }

    .el-tree-node.is-current,
    .el-tree-node.is-focused {
        background-color: #f5f5f5;
    }
}

// 时间选择器(Time Picker)
.el-time-picker {
    .el-input {
        .el-input__inner {
            height: 36px;
            border-radius: 2px;
        }
    }

    .el-time-panel {
        .el-time-spinner__item {
            height: 36px;
            line-height: 36px;

            &.is-active,
            &:hover {
                background-color: #f5f5f5;
            }
        }
    }
}

// 日期选择器(Date Picker)
.el-date-editor {
    .el-input {
        .el-input__inner {
            height: 36px;
            border-radius: 2px;
        }
    }

    .el-date-table {
        td {
            height: 36px;
            line-height: 36px;

            &.is-selected {
                background-color: $primary-color;
                color: #fff;
            }
        }
    }
}

// 滑块(Slider)
.el-slider {
    .el-slider__runway {
        border-color: $secondary-color;
        border-radius: 2px;
    }

    .el-slider__bar {
        background-color: $primary-color;
    }

    .el-slider__button-wrapper {
        .el-tooltip {
            z-index: 1000;
        }
    }
}

// 弹窗(Popover)
.el-popover {
    border: 1px solid $secondary-color;
    border-radius: 2px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);

    .el-popover__arrow {
        border-color: $secondary-color;
    }
}

// 操作提示(Tooltip)
.el-tooltip__popper {
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
}
